<template>
	<div class="gallary" @click="handleCilck">
		<div class="gallary-content">
			<swiper :options="swiperOptions">
				    <swiper-slide v-for='(item, index) in img' :key='index'>
				    	<img :src="item" class="gallary-img" />
				    </swiper-slide>

		    	<div class="swiper-pagination"  slot="pagination"></div>
		  	</swiper>
	  	</div>
	</div>
</template>

<script>
export default {
	name: 'CommonGallary',
	props: {
		img: Array
	},
	data () {
		return {
			swiperOptions: {
				pagination: '.swiper-pagination',
				paginationType: 'fraction',
				observer: true,
				observeParents: true	

			}
		}
	},
	methods: {
		handleCilck () {
			this.$emit('showClick')
		}
	}

}	
</script>

<style lang="stylus" scoped>
	.gallary >>> .swiper-container
		overflow: inherit
	.gallary
		z-index: 99
		background: #000
		position: fixed
		top: 0
		right: 0
		left: 0
		bottom: 0
		display: flex
		flex-direction: column
		justify-content: center
		color: #fff
		.gallary-content
			width: 100%
			height: 0
			padding-bottom: 100%
			.gallary-img
				width: 100%
			.swiper-pagination
				color: #fff
				bottom: -5rem

</style>